<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ include file="../common/include/include.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<link rel="stylesheet" href="<%=basePath%>css/css1.css" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>欢迎访问普度成长网</title>
<script type="text/javascript">
	//登录
	function login() {
		//检验帐号密码必填
		var custID = document.getElementById("loginForm.cust_id").value;
		var custPwd = document.getElementById("loginForm.cust_pwd").value;
		if (custID == "") {
			alert("请输入帐号");
			return;
		}
		if (custPwd == "") {
			alert("请输入密码");
			return;
		}
		chgAction("loginAction", "login");
		document.forms[0].submit();
	}

	//load cookie
	function loadCookie() {
		var idCookie = getCookie("PUDU_COOKIE_LOGIN_ID");
		var pwdCookie = getCookie("PUDU_COOKIE_LOGIN_PWD");
		if (idCookie != "" && pwdCookie != "") {
			//document.getElementById("loginForm.cust_id").value = idCookie;
			//document.getElementById("loginForm.cust_pwd").value = pwdCookie;
			//login();
		}

	}

	//获取cookie
	function getCookie(c_name) {
		if (document.cookie.length > 0) {
			c_start = document.cookie.indexOf(c_name + "=");
			if (c_start != -1) {
				c_start = c_start + c_name.length + 1;
				c_end = document.cookie.indexOf(";", c_start);
				if (c_end == -1)
					c_end = document.cookie.length;
				return unescape(document.cookie.substring(c_start, c_end));
			}
		}
		return "";
	}

	//跳转至登录画面
	function goSubLogin() {
		window.location = "subLogin.jsp";
	}

	function goRegister() {
		window.location = "register.jsp";
	}
</script>
</head>
<body onload="loadCookie()">
	<s:form action="loginAction" name="form1" namespace="/front">
		<s:hidden name="loginFlag" value="1"></s:hidden>
		<div class="hometop">
			<div class="homelogo">
				<img src="<%=basePath%>images/puduhome_01.gif" width="186"
					height="72" />
			</div>
			<div class="hometopr">
				<div class="hometopr1" align="right">
					<ul>
						<li><a href="#">会员中心</a></li> |
						<li><a href="#">收藏本站</a></li> |
						<li><a href="#">设为主页</a></li> |
						<li><a href="#">帮助中心</a></li>
					</ul>
				</div>
				<div class="hometopr2">您好！欢迎来到普度成长网</div>
				<div>
					<img src="<%=basePath%>images/puduhome_02.gif" width="810"
						height="4" />
				</div>
			</div>
			<div class="clear"></div>
		</div>
		<div style="margin: 0 auto; width: 1002px;">
			<div class="list">
				<embed src="<%=basePath%>images/index.swf" width="445" height="316"></embed>
			</div>
			<div class="time"></div>
			<div class="clear"></div>
		</div>
		<div class="onload">
			<span class="font7">账号：</span>
			<s:textfield name="loginForm.cust_id" id="loginForm.cust_id" cssClass="account"></s:textfield>
			<span style="visibility: hidden;">中</span><span class="font7">密码：</span>
			<s:password name="loginForm.cust_pwd" id="loginForm.cust_pwd" cssClass="account"></s:password>
			<span class="font8" title="两周内自动登录">
			<s:checkbox name="autoLogin" id="autoLogin"></s:checkbox>下次自动登录</span> 
			<span style="visibility: hidden;">k</span><span class="font7">
			<a href="#" onclick="login()">登录</a> </span> <span style="visibility: hidden;">k</span>
			<span class="font8"><a href="#">忘记账号密码</a></span> 
			<span style="visibility: hidden;">k</span><span class="font7">
			<a href="#" onclick="goSubLogin()">登录</a> </span> <input type="button" value="goRegister" onclick="goRegister()" /> <br> 
				<s:if test="result=='loginFail'">
					<span class="font7">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<font color="red">帐号密码错误，请重新输入</font>
					</span>
				</s:if>
		</div>
		<div class="onload2">
			<ul>
				<li><a href="#">公益及活动</a></li>
				<li><a href="#">集思广益</a></li>
				<li><a href="#">分享中心</a></li>
				<li><a href="#">搜索</a></li>
				<li><a href="#">论坛</a></li>

			</ul>
		</div>
		<div class="information">
			<div style="width: 966px; margin: 0 auto;">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td width="63%">copright<span style="visibility: hidden;">中</span>
							2012All<span style="visibility: hidden;">中</span>
							版权所有：武汉普度教育科技有限公司
						</td>
						<td width="37%" class="information2"><ul>
								<li><a href="#">关于普度</a></li>
								<li><a href="#">用户隐私</a></li>
								<li><a href="#">信息反馈</a></li>
								<li><a href="#">友情链接</a></li>
								<li><a href="#">普度广告</a></li>
								<li><a href="#">机构合作</a></li>
							</ul></td>
					</tr>
				</table>
			</div>
		</div>
	</s:form>
</body>
</html>
